home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm2
/
dlgmcs17.lha
/
EmacsDLG.DOC
< prev
next >
Wrap
Text File
|
1995-07-05
|
36KB
|
1,066 lines
EEEEE DDDD L GGG
E D D L G G
E mmmmm aaa cccc ssss D D L G
EEEE m m m a c s D D L G GGG
E m m m aaaa c ssss D D L G G
E m m m a a c s D D L G G
EEEEE m m aaaa cccc ssss DDDD LLLLL GGGG
An Emacs-style Message Editor for DLG V1 by Alan Bland
Version 1.7 - July 1995
1. DISTRIBUTION RIGHTS
EmacsDLG can be copied and distributed freely for any non-
commercial purposes. Distributors of public domain software
collections may redistribute EmacsDLG for media costs only.
Previous versions of EmacsDLG were shareware. EmacsDLG is
now freeware. All functions previously available only to
registered users are now available to all. No keyfile is
necessary. The following features were previously available
only to registered users but now are generally available:
- EmacsFIG, a Gadtools-based program that lets you
customize many aspects of your EmacsDLG configuration:
colors, quote header, quote prefix, most text strings.
You will even be able to install multiple
configurations so you can run EmacsDLG in several
different languages!
- Interfaces to use an AREXX spelling checker and any
compatible fortune cookie generator.
- Individual customization per-user via the EmacsOpts
external program.
- Full integration with the Hack & Slash messaging
system.
For additional tips, see the Changes.TXT file included with
EmacsDLG.
EmacsDLG 1.7 July 1995
- 2 -
2. INSTALLATION
To install EmacsDLG on your system for the first time,
perform the following steps:
a. Copy the EmacsDLG and EmacsFIG executables into your
DLG: directory (or anywhere else you wish).
b. Copy the EmacsDLG.HLP and EmacsOpts files into your
DLGconfig:Misc directory.
c. In the DLGconfig:Misc directory, run the EmacsFIG
program. Make any custom changes you wish, then SAVE
the results. The output of this program is a file
called EmacsDLG.CFG, which by default must be stored
in your DLGconfig:Misc directory.
d. Install the reqtools.library into your LIBS:
directory. You probably already have reqtools.library
from some other utility that you use. If you don't
already have it, you should be able to obtain it from
any Amiga BBS. The reqtools.library is used for a
file requester for local port file operations. If you
do not install reqtools.library, you will not be able
to use the file requester.
e. Create an entry in your DLG Editor menu for EmacsDLG.
In the description, you should mention that it is an
Emacs-style editor and that it works for IBM ANSI and
Amiga ANSI terminals. Here are the settings to use.
The flag settings are very important to the correct
operation of EmacsDLG:
Name: EMACS Full Screen Editor (ANSI IBM or Amiga)
Call string: DLG:EmacsDLG ~b ~h ~r %uname %port
CTRL-c breaking: No
CTRL-d breaking: Yes
Return/linefeed: Yes
Echo: No
Process killing: Yes
Kill pending: No
Pass-thru mode: No
Pausing: No
Raw mode: Yes
Timeouts: Yes
Verbose pause: No
Line freezing: Yes
That's all you need to do! EmacsDLG is now ready to be used
by you and your callers!
EmacsDLG 1.7 July 1995
- 3 -
2.1 FILE LOCATIONS
After you have properly installed EmacsDLG, you will see the
following files. If something does not work properly, check
to make sure the files are in their proper locations.
_______________________________________________________
|File Location |
|______________________________________________________|
| EmacsDLG DLG: (or elsewhere if you wish) |
| EmacsFIG DLG: (or anywhere in your PATH) |
| EmacsDLG.HLP DLGconfig:misc |
| EmacsOpts DLGconfig:misc |
| EmacsDLG.OPT USER:User_Name (created by EmacsOpts) |
| EmacsDLG.CFG DLGconfig:misc (created by EmacsFIG) |
|______________________________________________________|
|______________________________________________________|
2.2 UPGRADING FROM PREVIOUS VERSIONS
If you already have a version of EmacsDLG installed, you
should make backup copies of the files and then copy the new
files over the old ones.
Next, you need to upgrade your old EmacsDLG.CFG file from
the old format ot th enew format. To perform the
conversion, simply execute the following commands:
cd DLGconfig:misc (or wherever you keep EmacsDLG.CFG)
run EmacsFIG
--> click on the SAVE gadget
EmacsFIG will automatically convert the old format
configuration file to the new format. If you fail to
perform this step, EmacsDLG will exit with an error message
when you try to run it.
2.3 MULTIPLE CONFIGURATIONS
You may choose to install multiple EmacsDLG configurations.
The most likely reason would be to have different setups for
different languages, but you might also want to use
different spelling checkers or different fortune cookie
programs.
To setup a second EmacsDLG configuration, perform the
following steps:
a. Create a directory, say "doors:EmacsToo".
b. Copy the EmacsDLG.HLP file into the directory, and use
any text editor to edit it as desired.
EmacsDLG 1.7 July 1995
- 4 -
c. Copy the EmacsOpts program into the directory.
Otherwise the per-user customization command will not
work.
d. Run EmacsFIG in this directory and save any desired
changes. NOTE: You must CD to this directory before
running EmacsFIG!
e. Add a new editor entry, but use the following call
string:
DLG:EmacsDLG ~b ~h ~r %uname %port doors:EmacsToo/
NOTE: The directory path MUST have a trailing slash or
colon.
EmacsDLG will look in the specified directory for its
configuration files instead of in the default
DLGconfig:Misc/.
3. USER SETUP
EmacsDLG has been extensively tested with Terminus 16-color
ANSI mode using an IBM font. Any terminal package that
performs similar IBM ANSI emulations should perform just as
well.
Several settings in the user's DLG Options menu affect how
EmacsDLG operates:
- The ANSI Color setting determines whether EmacsDLG
displays color or monochrome.
- EmacsDLG adapts to the users screen width and length.
- The ANSI Screen Positioning setting determines whether
EmacsDLG uses the smart insert/delete character
operations. If Screen Positioning is ON, EmacsDLG uses
those operations for fast screen updates. If Screen
Positioning is OFF, EmacsDLG avoids those sequences,
allowing it to work great with most IBM terminal
programs.
Below is a list of recommended settings for several IBM
terminal programs that have a history of not working well
with DLG. You will find EmacsDLG works very well when the
settings are correct.
- QMODEM: Set QMODEM for ANSI emulation, Keypad emulation
ON, Numlock ON, and strict color ON. Set DLG for ANSI
screen positioning OFF.
EmacsDLG 1.7 July 1995
- 5 -
- PROCOMM: Set PROCOMM for ANSI-BBS emulation. Set DLG
for ANSI screen positioning OFF.
Regular users of MicroEmacs, GNUemacs, MG2, EmacsXL, or
other variants of Emacs will feel quite at home with
EmacsDLG. Many commands have been removed or restricted to
prevent users from accidentally or otherwise gaining access
to files on your system. The supplied help file lists the
most common commands, but other popular Emacs commands also
work.
4. SYSOP FILE OPERATIONS
Several additional commands are available to users with
access level 255. The access level is configurable using
EmacsFIG. These commands are:
^X^I Insert-file
This command reads a text file from disk and
inserts it into the message at the cursor. If
EmacsDLG is run from a local port (i.e. TL0) and
the reqtools.library is installed, a file
requester will pop up to let you choose the file
using the mouse. Otherwise EmacsDLG will prompt
for the name of the file. ^XI may also be used
instead of ^X^I.
If ^X^I detects a non-ASCII file, it will
automatically UUENCODE the file. The UUENCODE
algorithm is built in to EmacsDLG so no external
program is necessary.
Your users can use ^X^I to insert a file from
their private file directory. A typical use would
be to upload a file to themselves, then use ^X^I
to mail it to another user.
^X^W Write-file
This command writes the contents of the message
buffer into a disk file. If EmacsDLG is run from
a local port (i.e. TL0) and the reqtools.library
is installed, a file requester will pop up to let
you choose the file using the mouse. Otherwise
EmacsDLG will prompt for the name of the file.
^X^P Print-file
This command prints the message buffer to your
PRT: device. The same access permissions as ^X^W
Write-file are used for ^X^P Print-file.
EmacsDLG 1.7 July 1995
- 6 -
5. CUSTOMIZATION WITH EMACSFIG
EmacsDLG works well "out of the box", but you may want to
customize various aspects of the program. You can use the
EmacsFIG Gadtools-based configuration program. EmacsFIG
will let you select colors, language text, quote headers,
and many more options.
Since EmacsFIG uses GadTools as its user interface, you must
be running Workbench 2.0 or later to use it. No support for
1.3 is planned.
Run EmacsFIG in the directory you specified on the EmacsDLG
command line when you installed EmacsDLG. EmacsFIG creates
a file named EmacsDLG.CFG that contains your customization
options. Following are descriptions of each of the options
you may configure.
5.1 FILE READ ACCESS
This defines the minimum access level for the ^X^I insert-
file command. Any file on your system can be read using
this command, so it should be available only to you and
possibly your co-sysops.
5.2 FILE WRITE ACCESS
This defines the minimum access level for the ^X^W write-
file command. Any file on your system can be written using
this command, so it should be available only to you and
possibly your co-sysops.
5.3 TAB WIDTH
When the user presses the TAB key, EmacsDLG inserts spaces
until the next tab position is reached. By default, the tab
stops are set to every 8 positions.
5.4 FORTUNE COOKIE COMMAND
A fortune cookie is a random comment, phrase, or joke that
can be inserted at the end of your message. If enabled, the
fortune cookie will appear after your message text but
before your signature (if any).
EmacsDLG allows up to twenty different fortune cookie
commands to be configured. This lets your users choose
different themes depending on the message area they're
using, or on their mood. For example, you could setup
fortunes for Star Trek, Movie Trivia, Famous Quotes, Dead
Baby Jokes, or whatever.
EmacsDLG 1.7 July 1995
- 7 -
Click the "New" gadget to create a new fortune cookie
command. Enter the command and a brief description of the
command. The description is what the users see when they
choose from multiple fortune commands, so say something like
"Star Trek quotes" as your description.
Click the "Delete" gadget to delete the currently displayed
fortune cookie command, and click on "Next" to step through
all of the commands you have defined.
To use fortune cookies, you must find a suitable fortune
cookie command and tell EmacsDLG how to run it. The basic
requirement is that it must write its message to standard
output with no ANSI codes. You should keep fortunes limited
to one or two lines to avoid the wrath of other sysops.
- Mark Montminy's CRUMBS program is highly recommended.
It includes options to limit the chosen cookie to a
certain number of lines, and to provide leading and
trailing delimiters if you wish. CRUMBS is available
from most BBS's that offer DLG support files. LI
Here's a reasonable setup for CRUMBS that limits
fortunes to two lines, and puts three dots in front of
the fortune to make it stand out:
dlg:utils/crumbs -l 2 -p ...
- Several databases of fortunes are floating around the
DLG community, included the typical cookies, Star Trek
phrases, and obscene fortunes. You may also choose to
create a database of your own fortunes, so that your
messages have a more individualized appearance. Look
around various BBS's to find fortune cookie files.
Enter the fortune cookie command in the appropriate gadget
in EmacsFIG. Do not use any file redirection. Do not use
"run" to execute the command. The command should be found
in your CLI PATH, or you may specify the full path of the
command.
The fortune cookie command line may contain any of the
normal DLG %variables. These will be expanded and passed to
the fortune program, which may then do further processing.
This might be used by a combination fortune/signature
program to include the user's name in the generated fortune.
Note that this capability is meaningless if your fortune
cookie program does not use it.
By default, the fortune cookie will NOT be added to
messages. To get a cookie you must use the ESC-Z (user
customization) command from within EmacsDLG. Any user who
wants to use the fortune cookies must do this. They will
then have a choice of three fortune cookie options:
- Never append a cookie to messages. This is the
default.
EmacsDLG 1.7 July 1995
- 8 -
- Ask if a cookie should be used when the message is
saved. In this mode, the chosen cookie will appear in
the lower EmacsDLG window and you can choose whether or
not to use it. If you don't like it, more cookies will
be chosen until you find one you like, or you give up.
- Always append a cookie to messages. In this mode,
EmacsDLG will choose a cookie and append it without
letting you preview the cookie. This only works if you
have defined exactly one fortune cookie command. If
you define more than one, EmacsDLG will always ask.
The user also gets to decide which of the fortune cookie
topics is to be used as their default. They can specify one
to use, or they can have EmacsDLG ask them each time they
save a message.
Remember, to get a fortune cookie you must configure it in
the user customization command.
5.5 FILE REQUESTER DIRECTORY
The ^X^I insert-file and ^X^W write-file commands use a file
requester. You may specify the directory path to be
displayed the first time the file requester is used. The
default is RAM:.
5.6 BROADCAST PORTS
The ESC ! command can be used to send a broadcast message to
another port. This is useful if you get a broadcast message
from another user, and you want to respond without leaving
the editor. When ESC ! is invoked, EmacsDLG shows a listing
of who is on-line, so that you can direct your broadcast to
the correct port. By default, the port listing will show
TR0, TR1, and TL0.
Specify the ports you want displayed in the BROADCAST PORTS
gadget. Type all your ports together as one string with no
blanks. For example, "TR0TR1TR2TR3TR4".
5.7 SPELLING CHECKER RUN COMMAND
EmacsDLG uses an external AREXX spelling checker. If you
wish EmacsDLG to start the spelling checker program when a
user first invokes it, specify that command here. Note that
you will most likely want to use "RUN >NIL: command" so that
the spelling checker is run in the background. The
redirection to NIL: is necessary to prevent AmigaDOS from
writing the "[CLI n]" message to the user's screen.
EmacsDLG 1.7 July 1995
- 9 -
You may instead prefer to start the spelling checker in your
user-startup and leave it running all the time. If you wish
to do this, enter a ";" semi-colon as the spelling checker
run command.
See the SPELLING CHECKER section later in this manual for
details on how to configure specific spelling checkers. The
default setup will work with Ispell.
5.8 SPELLING CHECKER AREXX PORT
Enter the name of the AREXX port used by your spelling
checker. The default setup will work with Ispell.
5.9 SPELLING CHECKER CHECK COMMAND
Enter the AREXX command used by your spelling checker to
check a work. The spelling checker must respond in one of
the following ways:
- It should send a result code of 1, with a secondary
result of "ok" or "bad" depending on whether or not the
word is spelled correctly.
- It should send a result code of 1 if the word is
spelled correctly, or a result code of 0 if the word is
spelled incorrectly.
5.10 SPELLING CHECKER EXIT COMMAND
Enter the AREXX command that will cause your spelling
checker program to exit. EmacsDLG will send this command
when the user exits from EmacsDLG. The default setup works
with Ispell.
You may prefer to leave your spelling checker running at all
times. If you wish to do this, enter a ";" semi-colon as
the spelling checker exit command.
5.11 CUSTOM TEXT
Many of the text messages displayed by EmacsDLG can be
customized. The scrolling list contains a short description
of each text that can be changed. Click on the desired
description to cause the current value to be displayed in
the large gadget below the list. Then click on the large
gadget to change the text as desired.
Most of the text strings are obvious. Several need more
explanation, and are described below.
EmacsDLG 1.7 July 1995
- 10 -
5.12 QUOTE GREETING TEXT
The "Quote Greeting" is inserted at the top of a quoted
message. Several special codes are used to allow you to
customize the contents of the quote greeting. The permitted
codes are listed below. Please note that the case of each
code IS important.
Your users may create their own quote greetings using the
ESC-Z command. Once a user has saved their settings with
ESC-Z, they get whatever quote greeting was in effect at the
time they saved it. If you change it in EmacsFIG, those
users will not get the new quote greeting.
The following codes may be used in the quote greeting:
%F The full name of the original message author
(FROM).
%f The first name of the original message author.
%T The full name of the original message recipient
(TO).
%S The subject or title of the quoted message.
%q The quote attribution of the original message
author. This will be either the initials or first
name, depending on how you have configured the
quote prefix in EmacsFIG.
%d The date and time that the quoted message was
written.
%N A hard newline is inserted at this point. You
normally will want to end your quote greeting with
a hard newline.
%% A single "%" is inserted at this point.
Here are some useful examples:
On %d %F wrote about %S:%N
Dear %f,%N%NYou recently wrote the following message about
"%S" to %T:%N
%F wrote the lines marked "%q" in the following quote:%N
EmacsDLG 1.7 July 1995
- 11 -
5.13 YES/NO TEXT
The "Input yes" and "Input no" text defines what your user
will use to answer yes/no questions. Specify the entire
word. EmacsDLG will recognize the first character as the
value typed by the user.
5.14 COLORS
Click on the gadget above the color pallete to choose which
color you want to configure, then select the color from the
pallete. The preview window shows you what your users will
see using the standard IBM ANSI color pallete. Depending on
the terminal program in use, the 8 brighter colors may show
up as bold text.
5.15 BORDER STYLE
Click on the Border Style gadget to change the way the
border between Emacs windows is displayed. Choices include
a reverse bar, ANSI single and double lines, and a variety
of ASCII characters. Watch the preview window to see the
results. The Reverse Bar and ASCII character selections an
be displayed on any terminal, while the The single and
double line selections require your users to use an IBM ANSI
character set.
5.16 QUOTE PREFIX
One of the cycle gadgets lets you choose the style of quoted
lines. You may select from the author's first name or
initials, and the initials may be either upper or lower
case. You may also choose a simple ">" if you would rather
not clutter your quotes with names or initials.
5.17 SPECIAL OPTIONS
The Special Options list allows special customization to be
done that is not specifically supported by EmacsFIG.
Normally you will not need to use this list. Watch for
messages on the DLG support echos for special circumstances
where the Special Options may be necessary.
There are ten entries in the Special Options list. To add a
Special Option, click on one of the blank entries in the
list, then enter the value in the gadget below the list. To
remove one, click on the entry in the list and then blank it
out in the gadget below the list. Be very careful when
entering Special Options. If you misspell an option, you
may cause EmacsDLG to malfunction.
EmacsDLG 1.7 July 1995
- 12 -
5.18 SPECIAL WORD WRAP OPTION
NOTE: This is available only in the ESC-Z per-user
customization command and cannot be set globally using
EmacsFIG. Actually, there is a way using the SPECIAL
OPTIONS list, but there really should never be a need to set
this option globally.
The special word wrap option causes EmacsDLG to
automatically turn word wrap OFF whenever it is invoked with
a normal file. Messages and file descriptions will always
have word wrap on by default.
The reason for this option is that some sysops like to use
EmacsDLG to remotely edit their configuration files. Word
wrapping must be off when editing those files, else disaster
may ensue. The only people likely to set this option are
those sysops and co-sysops who regularly edit configuration
files remotely.
Note that when this option is set, word wrapping will be
turned off when creating a DLG bulletin and when adding a
comment to a file description. DLG provides no way for
EmacsDLG to determine that these particular kinds of files
are being edited. If you turn this option on, you will want
to use ^XMW to manually turn on word wrapping for those
kinds of files.
The default behavior for EmacsDLG is to always have word
wrapping on.
6. THE SPELLING CHECKER
EmacsDLG uses AREXX to communicate with an external spelling
checker. Any spelling checker that supports a compatible
AREXX interface will work. EmacsDLG has been tested with
ISpell version 3.3LJR, and RXSpell, an AREXX spelling
checker used by Xenolink. Both ISpell and RXSpell are
freely distributable.
ISpell is available on many BBS's that provide DLG support
files. It is available for FTP from Aminet sites, ususally
in the os2/util directory under the name ispell-3.3LJR.lzh,
and it is on the Aminet CD-ROM.
Alternatively you can use RXSpell. RXSpell is smaller and
faster than ISpell, but knows fewer words.
EmacsDLG 1.7 July 1995
- 13 -
6.1 SETUP
You can setup ISpell in either of two ways. The first way
will simply cause misspelled words to be flagged, and allows
the user to enter a replacment. Specify the following
options in EmacsFIG:
_____________________________________
|Spell run run >nil: c:ispell -r |
|AREXX port IRexxSpell |
|Spell check quickcheck |
|Spell exit exit |
|____________________________________|
The second way to use ISpell is to have it provide a list of
suggested replacements for any misspelled word. The user
can then enter the correct word from the list of
suggestions, or supply their own word. This is the
recommended setup. Specify the following options in
EmacsFIG:
_____________________________________
|Spell run run >nil: c:ispell -r |
|AREXX port IRexxSpell |
|Spell check check |
|Spell exit exit |
|____________________________________|
To use RXSpell, specify the following options in EmacsFIG:
_______________________________________________________________
|Spell run run >nil: doors:spell/rxspell doors:spell/dict. |
|AREXX port SPELL |
|Spell check CHECKWORD |
|Spell exit QUIT |
|______________________________________________________________|
IMPORTANT INFORMATION: When you configure the spelling
checker for the first time, you MUST use EmacsFIG and SAVE
the result. Even if you use the default values shown in
EmacsFIG, those defaults will only take effect if you SAVE
them.
My tests show that ISpell uses about 700K of RAM, while
RXSpell only uses 70K of RAM. You may want to consider the
RAM requirements in choosing which spelling checker to use.
6.2 USING THE SPELLER
To run the spelling checker on the current message, press
ESC-C. EmacsDLG will interactively prompt for each
misspelled word, asking you for a replacement. If you
choose to enter a replacement, the new word will be
substituted for the old one.
EmacsDLG 1.7 July 1995
- 14 -
If ISpell has been configured correctly, EmacsDLG will pop
up a window containing suggested replacments when a
misspelled word is found.
7. HACK & SLASH MESSAGING INTEGRATION
EmacsDLG can be invoked by Mark Montminy's Hack & Slash door
game to edit messages within the game. EmacsDLG treats Hack
& Slash messages like regular messages. The Hack & Slash
alias of the message recipient and subject will appear at
the top of the screen, and more importantly, the quote
commands work for quoting replies!
Please contact me if you are the author of a door program
and would like to have EmacsDLG integrated with your door.
8. TROUBLESHOOTING
The most common problems with EmacsDLG are caused by
installing the files in the wrong places. Please see the
INSTALLATION section for a list of file locations. Note
that you may also specify a directory where all the EmacsDLG
files will live. If you do it this way, all files go in
this directory, which simplifies installation and
troubleshooting.
When running EmacsFIG, ALWAYS remember to CD to the
directory where your EmacsDLG.CFG file lives. Otherwise it
will create a new one, and since the new one is in the wrong
directory, EmacsDLG won't find your settings.
When upgrading to a new version of EmacsDLG, always run
EmacsFIG and SAVE the results. This guarantees that your
EmacsDLG.CFG file is up to date with the latest version.
If you get "Spelling checker not installed", you have either
misspelled the name of the AREXX port for the spelling
checker, or your EmacsDLG.CFG file is in the wrong
directory.
If you get "No response from spelling checker", most likely
your spelling checker command string is incorrect.
The spelling checker may return an error number. If the
number is greater than zero, it is an AREXX error that you
can look up in your AREXX manual. Negative numbers indicate
weird internal problems and should be reported to the
author.
EmacsDLG 1.7 July 1995
- 15 -
If you get an empty fortune, it's a bug in CRUMBS. :-)
If a user has used the ESC-Z command to customize their
editing environment, all of the customizable options are
saved. If you later make a global change using EmacsFIG,
the change will be seen only by users who have not used
ESC-Z.
Here's the general sequence of activities when EmacsDLG
starts up. This may help you in figuring out why something
is misbehaving. You might try running SnoopDos is something
is misbehaving.
1. Read the user's User.Data file.
2. Read the EmacsDLG.CFG file to get the sysop-customized
options.
3. Read the user's EmacsDLG.opt file to get user-
customized options. All options specified here
override the sysop-customized options.
4. Read in the file to be edited, if any.
5. The first time a quote command is used, the quoted
message is read in and formatted.
6. The first time the user requests help, the
EmacsDLG.HLP file is loaded into memory. Subsequent
help requests use the in-memory copy.
The ESC-Z command works as follows:
1. Load the EmacsOpts program, passing to it the options
that are currently in effect.
2. If the user aborts their changes, EmacsOpts exits.
3. If the user save their changes, EmacsOpts writes the
EmacsDLG.OPT file in the user's home directory, and
then exits.
4. After EmacsOpts exits, EmacsDLG reads the EmacsDLG.OPT
file to make the new options take effect. If a
message has already been quoted, the new quoting
options will not take effect until the next time
EmacsDLG is run.
EmacsDLG 1.7 July 1995